#!/bin/bash

DEFAULT_ADDR=10.33.100.81
DEFAULT_PORT=80

if [ "$1" != "" ]; then ADDR=$1; else ADDR=$DEFAULT_ADDR; fi
if [ "$2" != "" ]; then PORT=$2; else PORT=$DEFAULT_PORT; fi

export PROXY_ADDR=$ADDR
export PROXY_PORT=$PORT
export http_proxy="http://$ADDR:$PORT"
export ftp_proxy="ftp://$ADDR:$PORT"
export RSYNC_PROXY="$ADDR:$PORT"

alias links="links -http-proxy $ADDR:$PORT"
git config --global http.proxy $ADDR:$PORT
git config --global core.gitproxy gitproxy
